<!-- 数据主体 -->
<?php if(!isset($_GET['selected'])){?>
<div class="panel" style="margin-bottom:0;height:550px;">

<div  class="row" style="margin:0;">
    <div class="col-sm-4">
        <?php }?><?php if(!isset($_GET['selected'])){?>
        <div style="padding:15px 0;">
            <form action="<?php echo U('Member/departlist');?>" id="selectdatalistform">
                <input type="hidden" name="position" value="">
                <?php if(!isset($_GET['selected'])){?>
                <div class="input-group m-bot15" id="memb-search">
                    <input placeholder="搜索姓名" type="text" class="form-control" name="keywords" value="" style="">
                    <span class="input-group-btn">
                        <button  class="btn btn-default" type="submit"><i class="fa icon-search"></i></button>
                    </span>
                </div>
                <?php }?>
            </form>
        </div>
        <div>
            <!--listloaded="mylist"-->
            <html:dropdownselect class="showmeselect6" selected="" name="showme" multi="0" listloaded="mylist" style="height:auto; width:auto;" action="{:U('Team/positionlist')}"  placeholder="选择部门" />
            <style>
					.seleText{ display:inline-block !important;}
            </style>
            <div id="reselectshowmelayout" style="top:0; display:none; left:0; bottom:0; right:0; position:fixed; z-index:9999999;"></div>
        </div>
    </div>
    <?php }?>
    <?php if(!isset($_GET['selected'])){?>
    <div class="col-sm-8" style="position:relative; height:550px; border-left: 1px solid #E7E7E7;">
    
    <div id="selectdatalist">
        <?php } ?>
        <!-- 选中的数据主体 -->
        <volist name="list" id="vo">
            <div class="text-primary seleBox member">
            	<div class="checked">
                    <a href="javascript:void(0);" onClick="$(this).parent().parent().remove();" class="seleIcon">
                        x
                    </a>
                    <input type="hidden" name="id<?php if(count($list) > 1 && isset($_GET['selected'])){echo '[]';}?>" value="{$vo.id}">
                    <input name="name<?php if(count($list) > 1  && isset($_GET['selected'])){echo '[]';}?>" type="hidden" value="{$vo.name}">
                    <p style="color:#686868; margin-bottom:0;">{$vo.name}</p>
                </div>
				<style>
                    .seleBox{position:relative; padding:2px 24px 2px 10px; margin:5px; display:inline-block; border:1px solid #E7E7E7; background:#fff;}
                    .seleIcon{position:absolute; border-radius:20px; font-size:16px; font-weight:bold; top:6px; right:4px; background:#f00; display:block; width:16px; height:16px; line-height:14px; text-align:center; color:#fff;z-index:2;}
                </style>
            </div>
        </volist>
        <!-- 选中的数据主体结束 -->
        <?php if(!isset($_GET['selected'])){ ?>
        </div>
         <div class="PagesBox" style="text-align:center; width:100%; position:absolute;bottom:0; left:0;" id="selectdatalistpages"></div>
    </div>
    <?php } ?>
    <?php if(!isset($_GET['selected'])){?>
</div>


<script>
$(window).trigger('load');
    $("#selectdatalist").on("click",".SelectDataListItem",function(e){
        $(".input[name='member']").parent().removeClass('checked');
        var name=$(this).find(".seleBox input[name='member_name']").val();
        $(".input[data-name='"+name+"']").parent().addClass('checked');
		if(typeof checkMember === 'function'){
			checkMember();	
		}
    });
    function mylist(){
        $('.showmeselect6').blur(function(){
            $("#selectdatalistform input[name='position']").remove();
            $('.showmeselect6.binded .itemspan').each(function(){
                $('#selectdatalistform').append("<input type='hidden' name='position' value='"+$(this).children("input:eq(1)").attr('value')+"'>");
            });
            $('#selectdatalistform').submit();
        });
    }
</script>
</div>
<?php }?>

